#_________________________________________________________________________________________________________________________________
#_________________________________________________________________________________________________________________________________
#_________________________________________________________________________________________________________________________________
#___________________________________________________________________________________________________________________________________________
inherit CometExpeEmeric_PM_P_U_controleur PM_U_Container
#___________________________________________________________________________________________________________________________________________
method CometExpeEmeric_PM_P_U_controleur constructor {name descr args} {
 this inherited $name $descr
   this set_nb_max_mothers   1
   this set_GDD_id GDD_CometExpeEmeric_PM_P_U_controleur
   
   this set_default_op_gdd_file    [Comet_files_root]Comets/CSS_STYLESHEETS/GDD/Common_GDD_requests.css++
   this set_default_css_style_file [Root_of_CometExpeEmeric]CSS/drag_drop.css++

 eval "$objName configure $args"
 return $objName
}

#___________________________________________________________________________________________________________________________________________
Methodes_set_LC CometExpeEmeric_PM_P_U_controleur [P_L_methodes_set_CometExpeEmeric] {} {}
Methodes_get_LC CometExpeEmeric_PM_P_U_controleur [P_L_methodes_get_CometExpeEmeric] {$this(FC)}

#___________________________________________________________________________________________________________________________________________
Generate_PM_setters CometExpeEmeric_PM_P_U_controleur [P_L_methodes_set_CometExpeEmeric_COMET_RE]

#___________________________________________________________________________________________________________________________________________
#___________________________________________________________________________________________________________________________________________
#___________________________________________________________________________________________________________________________________________
method CometExpeEmeric_PM_P_U_controleur set_LM {LM} {
 set rep [this inherited $LM]
 set this(cont)           "${objName}_cont"
 set this(cont_daughters) "${objName}_cont_daughters"
 if {![gmlObject info exists object $this(cont)]} {
   this set_L_nested_handle_LM    $this(cont)_LM_LP
   this set_L_nested_daughters_LM $this(cont_daughters)_LM_LP

   CometContainer $this(cont)           "Container of player's presentation $objName"         {} -Add_style_class "CONTAINER INTERNAL_ROOT ROOT root"
   CometContainer $this(cont_daughters) "Container of player's presentation $objName"         {} -Add_style_class "CONTAINER DAUGHTERS"
   set this(cont_commands)  [CPool get_a_comet CometContainer -Add_style_class "CONTAINER COMMANDS"]
     set this(txt_num_tirage) [CPool get_a_comet CometText      -Add_style_class "TEXT NUM_TIRAGE TIRAGE NUM" -set_text "0"]
     set this(cmd_ReInit)     [CPool get_a_comet CometActivator -Add_style_class "ACTIVATOR COMMANDS REINIT ReInit" -set_text "ReInit" -Subscribe_to_activate $objName "$objName ACTION_ReInit" ]
	 set this(files_choices)  [CPool get_a_comet CometSpecifyer -Add_style_class "SPECIFY FILES FILE IMAGES"]
	 $this(cont_commands) Add_daughters_R [list $this(txt_num_tirage) $this(files_choices) $this(cmd_ReInit)]
   
   $this(cont) Add_daughters_R [list $this(cont_commands) [[this get_LC] get_cont_tirage] $this(cont_daughters)]
   set this(reconnect_LM) 1
  }
 return $rep
}

#___________________________________________________________________________________________________________________________________________
Inject_code CometExpeEmeric_PM_P_U_controleur set_tirage_courant {
  $this(txt_num_tirage) set_text [expr 1 + [llength [this get_L_tirages]]]
 } {}
 
 #___________________________________________________________________________________________________________________________________________
method CometExpeEmeric_PM_P_U_controleur ACTION_ReInit {} {
 this prim_set_L_base_pour_tirage [glob [$this(files_choices) get_text]]
 this prim_ReInit
}

